import 'package:dmz/business/home/page/main_page.dart';
import 'package:dmz/request/request_client.dart';
import 'package:dmz/user/user_defurl.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';

///初始化注入对象
class Injection extends GetxService {
  Future<void> init() async {
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
    await Get.putAsync(() => SharedPreferences.getInstance());
    EMIBUserManger().getToken();
    Get.lazyPut(() => RequestClient(), fenix: true);
    Get.lazyPut(() => MainBinding());
    // Get.lazyPut(() => GatewayApi(), fenix: true);
    // Get.lazyPut(() => CommonApi(), fenix: true);
    // Get.lazyPut(() => EventBus(), fenix: true);
  }
}
